package com.party.core.service.system.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 表单帮助类
 */
public class MemberInfoUtil {
    public  static  String  getAgeByIdcard(String birthday) {
        String birthDate = birthday.substring(0,4);
        SimpleDateFormat df = new SimpleDateFormat("yyyy");
        String year = df.format(new Date());
        int age = Integer.parseInt(year) - Integer.parseInt(birthDate);
        if(age <= 0){
            return  "";
        }
        return age + "";

    }
}
